#include<stdio.h>

int main()
{
	int a[9] = { 3,8,1,9,6,4,7,5,2 };
	int i, j;
	for (i = 0; i < 9 - 1; i++)
	{
		for (j = 0; j < 9 - 1 - i; j++)
		{
			if (a[j] > a[j+1])
			{
				int temp = a[j];
				a[j] = a[j+1];
				a[j+1] = temp;
			}
		}
	}
	for (i = 0; i < 9; i++)
	{
		printf("a[%d]=%d\n",i,a[i]);
	}

	return 0;
}